@use "../global/variables";

.price__slider {
  position: relative;
  display: flex;
  margin-bottom: 25px;
  height: 24px;
  width: 100%;
}

.price__control-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  max-width: 300px;
}

.price__slider-toggle {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  background-color: variables.$base-white;
  border: 2px solid variables.$blue-primary;
  border-radius: 50%;

  &--max {
    left: 84%;
  }
}

.price__slider-line {
  position: absolute;
  top: 50%;
  width: 100%;
  height: 2px;
  background-color: variables.$base-grey;
  transform: translateY(-50%);
}

.price__slider-range {
  position: absolute;
  top: 50%;
  width: 84%;
  height: 4px;
  background-color: variables.$blue-primary;
  transform: translate(12px, -50%);
  z-index: 1;
}

.price__divider {
  width: 9px;
  height: 2px;
  background-color: variables.$base-grey;
}

@media (min-width: variables.$min-tablet-width) {
  .price__control-container {
    padding-left: 10px;
  }

  .price__divider {
    width: 9px;
  }

  .price__slider-toggle {
    &--min {
      left: 2%;
    }

    &--max {
      left: 80%;
    }
  }

  .price__slider-range {
    width: 80%;
  }
}

@media (min-width: variables.$min-desktop-width) {
  .price__control-container {
    max-width: none;
    margin-bottom: 0;
    padding-left: 0;
  }

  .price__slider-toggle {
    &--min {
      left: 1%;
    }

    &--max {
      left: 86%;
    }
  }

  .price__slider-range {
    width: 86%;
  }
}
